@extends('admin.layout.index')


@section('content')

<div class="col-md-12">
    <div class="card">
        <div class="card-action">
           轮播图
        </div>
        <div class="card-content">
            <div class="table">
	            <div class="row">
		            	<div class="col-sm-6">
			            	<div class="dataTables_length" id="dataTables-example_length">
	            			<form action="/admin/carousel/index" methot="get">
				            	<label>
					            	<select name="count" aria-controls="dataTables-example" class="form-control input-sm">
						            	<option value="10" @if(!empty($request['count']) && $request['count'] == 10) selected @endif>10</option>
						            	<option value="15" @if(!empty($request['count']) && $request['count'] == 15) selected @endif>15</option>
						            	<option value="20" @if(!empty($request['count']) && $request['count'] == 20) selected @endif>20</option>
						            	<option value="30" @if(!empty($request['count']) && $request['count'] == 30) selected @endif>30</option>
					            	</select> 选择显示的条数
				            	</label>
				            </div>
		            	</div>
		            	<div class="col-sm-6">
			            	<div id="dataTables-example_filter" class="dataTables_filter">
			            		<label>搜索:<input name="search" value="{{ $request['search'] or ''}}" class="form-control input-sm" aria-controls="dataTables-example" type="search"></label>
			            		<input type="submit" value="搜索">
			            	</div>
		            		</form>
		            	</div>

	            </div>

                <table class="table table-striped table-bordered table-hover" >
                    <thead>
                        <tr>
                            <th style='text-align:center;line-height:50px'>ID</th>
                            <th style='text-align:center;line-height:50px'>url</th>
                            <th style='text-align:center;line-height:50px'>image</th>
                            <th style='text-align:center;line-height:50px'>操作</th>
                        </tr>
                    </thead>
                    <tbody>
						@foreach($data as $k=>$v)
                        <tr>
                            <td style='text-align:center;line-height:50px'>{{ $v['id'] }}</td>
                            <td style='text-align:center;line-height:50px'>{{ $v['url'] }}</td>
                            <td style='text-align:center;line-height:50px'>
							<img src="{{ $v['image'] }}" style='height:50px;width:50px'>
                            
                            </td>
                            <td style='text-align:center;line-height:50px'>
                            	<a href="/admin/carousel/delete/{{ $v['id'] }}" title='删除' style="color:#333;font-size:17px"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
                            	<a href="/admin/carousel/edit/{{ $v['id'] }}" title='修改' style="color:#333;margin-left:20px;font-size:16px"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                            	<a href="/admin/carousel/add" title='添加' style="color:#333;margin-left:20px;font-size:16px"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
                            </td>
                        </tr>
						@endforeach
                    </tbody>
                </table>
                <div class="row">
	                <div class="col-sm-6">
		                <div class="dataTables_info" id="dataTables-example_info" role="alert" aria-live="polite" aria-relevant="all">
		                </div>
	                </div>
	                <div class="col-sm-6">
		                <div class="dataTables_paginate paging_simple_numbers" id="dataTables-example_paginate">
			               <!-- 分页 -->
			                {!! $data->render() !!}
		                </div>
	                </div>
                </div>
            </div>
        </div>
    </div>
     <!-- End  Kitchen Sink -->
</div> 
@endsection